package com.etc.bvblog.entity;

import java.io.Serializable;
import java.util.Date;

/**
 * 
 * @TableName article
 */
public class Article implements Serializable {
    /**
     * 编号，自动增长
     */
    private Long id;

    /**
     * 
     */
    private String title;

    /**
     * md文件源码
     */
    private String mdcontent;

    /**
     * html源码
     */
    private String htmlcontent;

    /**
     * 
     */
    private String summary;

    /**
     * 
     */
    private Integer cid;

    /**
     * 
     */
    private Integer uid;

    /**
     * 
     */
    private Date created;

    /**
     * 
     */
    private Date edittime;

    /**
     * 0表示草稿箱，1表示已发表，2表示已删除
     */
    private Integer state;

    /**
     * 
     */
    private Integer pageview;

    private static final long serialVersionUID = 1L;

    /**
     * 编号，自动增长
     */
    public Long getId() {
        return id;
    }

    /**
     * 编号，自动增长
     */
    public void setId(Long id) {
        this.id = id;
    }

    /**
     * 
     */
    public String getTitle() {
        return title;
    }

    /**
     * 
     */
    public void setTitle(String title) {
        this.title = title;
    }

    /**
     * md文件源码
     */
    public String getMdcontent() {
        return mdcontent;
    }

    /**
     * md文件源码
     */
    public void setMdcontent(String mdcontent) {
        this.mdcontent = mdcontent;
    }

    /**
     * html源码
     */
    public String getHtmlcontent() {
        return htmlcontent;
    }

    /**
     * html源码
     */
    public void setHtmlcontent(String htmlcontent) {
        this.htmlcontent = htmlcontent;
    }

    /**
     * 
     */
    public String getSummary() {
        return summary;
    }

    /**
     * 
     */
    public void setSummary(String summary) {
        this.summary = summary;
    }

    /**
     * 
     */
    public Integer getCid() {
        return cid;
    }

    /**
     * 
     */
    public void setCid(Integer cid) {
        this.cid = cid;
    }

    /**
     * 
     */
    public Integer getUid() {
        return uid;
    }

    /**
     * 
     */
    public void setUid(Integer uid) {
        this.uid = uid;
    }

    /**
     * 
     */
    public Date getCreated() {
        return created;
    }

    /**
     * 
     */
    public void setCreated(Date created) {
        this.created = created;
    }

    /**
     * 
     */
    public Date getEdittime() {
        return edittime;
    }

    /**
     * 
     */
    public void setEdittime(Date edittime) {
        this.edittime = edittime;
    }

    /**
     * 0表示草稿箱，1表示已发表，2表示已删除
     */
    public Integer getState() {
        return state;
    }

    /**
     * 0表示草稿箱，1表示已发表，2表示已删除
     */
    public void setState(Integer state) {
        this.state = state;
    }

    /**
     * 
     */
    public Integer getPageview() {
        return pageview;
    }

    /**
     * 
     */
    public void setPageview(Integer pageview) {
        this.pageview = pageview;
    }

    @Override
    public boolean equals(Object that) {
        if (this == that) {
            return true;
        }
        if (that == null) {
            return false;
        }
        if (getClass() != that.getClass()) {
            return false;
        }
        Article other = (Article) that;
        return (this.getId() == null ? other.getId() == null : this.getId().equals(other.getId()))
            && (this.getTitle() == null ? other.getTitle() == null : this.getTitle().equals(other.getTitle()))
            && (this.getMdcontent() == null ? other.getMdcontent() == null : this.getMdcontent().equals(other.getMdcontent()))
            && (this.getHtmlcontent() == null ? other.getHtmlcontent() == null : this.getHtmlcontent().equals(other.getHtmlcontent()))
            && (this.getSummary() == null ? other.getSummary() == null : this.getSummary().equals(other.getSummary()))
            && (this.getCid() == null ? other.getCid() == null : this.getCid().equals(other.getCid()))
            && (this.getUid() == null ? other.getUid() == null : this.getUid().equals(other.getUid()))
            && (this.getCreated() == null ? other.getCreated() == null : this.getCreated().equals(other.getCreated()))
            && (this.getEdittime() == null ? other.getEdittime() == null : this.getEdittime().equals(other.getEdittime()))
            && (this.getState() == null ? other.getState() == null : this.getState().equals(other.getState()))
            && (this.getPageview() == null ? other.getPageview() == null : this.getPageview().equals(other.getPageview()));
    }

    @Override
    public int hashCode() {
        final int prime = 31;
        int result = 1;
        result = prime * result + ((getId() == null) ? 0 : getId().hashCode());
        result = prime * result + ((getTitle() == null) ? 0 : getTitle().hashCode());
        result = prime * result + ((getMdcontent() == null) ? 0 : getMdcontent().hashCode());
        result = prime * result + ((getHtmlcontent() == null) ? 0 : getHtmlcontent().hashCode());
        result = prime * result + ((getSummary() == null) ? 0 : getSummary().hashCode());
        result = prime * result + ((getCid() == null) ? 0 : getCid().hashCode());
        result = prime * result + ((getUid() == null) ? 0 : getUid().hashCode());
        result = prime * result + ((getCreated() == null) ? 0 : getCreated().hashCode());
        result = prime * result + ((getEdittime() == null) ? 0 : getEdittime().hashCode());
        result = prime * result + ((getState() == null) ? 0 : getState().hashCode());
        result = prime * result + ((getPageview() == null) ? 0 : getPageview().hashCode());
        return result;
    }

    @Override
    public String toString() {
        StringBuilder sb = new StringBuilder();
        sb.append(getClass().getSimpleName());
        sb.append(" [");
        sb.append("Hash = ").append(hashCode());
        sb.append(", id=").append(id);
        sb.append(", title=").append(title);
        sb.append(", mdcontent=").append(mdcontent);
        sb.append(", htmlcontent=").append(htmlcontent);
        sb.append(", summary=").append(summary);
        sb.append(", cid=").append(cid);
        sb.append(", uid=").append(uid);
        sb.append(", created=").append(created);
        sb.append(", edittime=").append(edittime);
        sb.append(", state=").append(state);
        sb.append(", pageview=").append(pageview);
        sb.append(", serialVersionUID=").append(serialVersionUID);
        sb.append("]");
        return sb.toString();
    }
}